<Application x:Class="DominionCS.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Application.Resources>
        <ResourceDictionary>
            <!--I have NO idea why this is needed. Without this, none of the
                applicatiion level resources can be found! This MUST be a bug!!!-->
            <ResourceDictionary.MergedDictionaries />
            <!--ContentControl style to display region name-->
            <Style x:Key="ContentControlRegionStyle" TargetType="{x:Type ContentControl}">
                <Setter Property="Foreground" Value="#FF000000"/>
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                <Setter Property="VerticalContentAlignment" Value="Top"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ContentControl">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Border Grid.Row="0" CornerRadius="4,4,0,0" BorderBrush="#FF28332D" BorderThickness="1" VerticalAlignment="Top">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,-0.601" StartPoint="0.5,1.601">
                                            <GradientStop Color="#FF303F2D"/>
                                            <GradientStop Color="#FFD7DED6" Offset="1"/>
                                            <GradientStop Color="#FF848E83" Offset="0.4869999885559082"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <!--Should really bind to RegionManager.RegionName but can't template bind to attached properties-->
                                    <TextBlock Text="{TemplateBinding Name}" TextWrapping="Wrap" HorizontalAlignment="Center" Foreground="#FFD9E3CF" FontWeight="Normal" FontFamily="Portable User Interface" FontSize="12" VerticalAlignment="Center"/>
                                </Border>
                                <ContentPresenter Grid.Row="1" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </Application.Resources>

</Application>
